﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="AdmAdminManage.aspx.cs"
    Inherits="LIMS.Web.AdmAdminManage" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title>管理员账号管理</title>
    <script src="jQuery/jquery-1.7.1.js" type="text/javascript"></script>
    <script type="text/javascript">
        $(function () {
            // $("#<%=btnFind.ClientID %>").click(function () {
            $("#btnFind").click(function () {
                if ($.trim($("#txtAdminName").val()).length == 0) {
                    $("#txtAdminName").focus();
                    document.getElementById("mesEmptyError").innerHTML = "管理员姓名不能为空";
                    return false;
                }
                return true;
            });
            $("#btnAddAdmin").click(function () {
                if ($.trim($("#txtAdminNo").val()).length == 0) {
                    document.getElementById("mesEmptyError").innerHTML = "管理员ID不能为空";
                    $("#txtAdminNo").focus();
                    return false;
                }
                if ($.trim($("#txtAdminName").val()).length == 0) {
                    document.getElementById("mesEmptyError").innerHTML = "管理员姓名不能为空";
                    $("#txtAdminName").focus();
                    return false;
                }
                if ($.trim($("#txtAdminPwd").val()).length == 0) {
                    document.getElementById("mesEmptyError").innerHTML = "管理员密码不能为空";
                    $("#txtAdminPwd").focus();
                    return false;
                }
                return true;
            })
        })
    </script>
</head>
<body>
    <form id="form1" runat="server">
    <div style="text-align: center">
        <table border="0" cellspacing="0" cellpadding="0" style="width: 770px;">
            <tr>
                <td>
                </td>
                <td style="width: auto; font-weight: bold; color: #000000; font-size: 36px; height: 30;
                    text-align: center">
                    权限管理
                </td>
            </tr>
            <tr style="font-size: 12pt; color: #000000;">
                <td>
                </td>
                <td style="width: 700px; text-align: left; font-size: 15pt; color: #000000; text-align: left;">
                    <div style="float: left; width: 250px; font-size: 18px; height: 24px;">
                        <span style="font-size: 10pt; color: #ff0000">* </span>管理员ID
                        <input id="txtAdminNo" type="text" runat="server" style="width: 90px" />
                        <asp:Button ID="btnCheckID" runat="server" Text="检测" 
                            onclick="btnCheckID_Click" />
                    </div>
                    <div style="float: left; width: 210px; height: 24px;">
                        <span style="font-size: 10pt; color: #ff0000">*</span> 管理员
                        <input id="txtAdminName" type="text" runat="server" style="width: 100px" />
                        <br />
                    </div>
                    <div style="float: left; width: 210px; height: 24px;">
                        <span style="font-size: 10pt; color: #ff0000">* </span>密码：
                        <asp:TextBox ID="txtAdminPwd" runat="server" Width="111px"></asp:TextBox>
                        <br />
                    </div>
                </td>
            </tr>
            <tr>
                <td>
                </td>
                <td align="center">
                    <div id="mesEmptyError" style="width: 200px; color: Red;" runat="server">
                    </div>
                </td>
            </tr>
            <tr>
                <td>
                </td>
                <td style="width: 580px; text-align: left; height: 30; text-align: center">
                    <asp:Button ID="btnAddAdmin" runat="server" Text="添 加" OnClick="btnAddAdmin_Click"
                        BorderColor="Aquamarine" Font-Size="15" />
                    &nbsp;&nbsp;&nbsp;
                    <asp:Button ID="btnFind" runat="server" Text="搜 索" OnClick="btnFind_Click" BorderColor="Aquamarine"
                        Font-Size="15" />
                    <%--   &nbsp;&nbsp;&nbsp;
                   <asp:Button ID="btnRemoveAdmin" runat="server" Text="删 除" OnClick="btnRemoveAdmin_Click"
                        BorderColor="Aquamarine" Font-Size="15" />--%>
                    &nbsp;&nbsp;&nbsp;
                    <asp:Button ID="btnFlush" runat="server" Text="刷 新" OnClick="btnFlushAdmin_Click"
                        BorderColor="Aquamarine" Font-Size="15" />
                </td>
            </tr>
            <tr>
                <td colspan="2" align="center" style="height: 27px">
                    <%-- <RowStyle BackColor="#F7F6F3" Font-Size="Small" />
                                <FooterStyle BackColor="#5D7B9D" Font-Bold="True" ForeColor="White" />
                                <RowStyle BackColor="#F7F6F3" ForeColor="#333333" />
                                <PagerStyle BackColor="#284775" ForeColor="White" HorizontalAlign="Center" />
                                <SelectedRowStyle BackColor="#E2DED6" Font-Bold="True" ForeColor="#333333" />
                                <HeaderStyle BackColor="#5D7B9D" Font-Bold="True" ForeColor="White" />
                                <EditRowStyle BackColor="#999999" />
                                <AlternatingRowStyle BackColor="White" ForeColor="#284775" />--%>
                    <br />
                    <asp:Repeater ID="rpAdmin" runat="server" OnItemDataBound="rpAdmin_OnItemDataBound">
                        <HeaderTemplate>
                            <table border="1" width="100%">
                                <tr align="center">
                                    <th>
                                        序号
                                    </th>
                                    <th>
                                        姓名
                                    </th>
                                    <th>
                                        用户ID
                                    </th>
                                    <th>
                                        密码
                                    </th>
                                </tr>
                        </HeaderTemplate>
                        <ItemTemplate>
                            <tr align="center">
                                <td>
                                    <%#Container.ItemIndex+1 %>
                                </td>
                                <td>
                                    <%#Eval("adminName")%>
                                </td>
                                <td>
                                    <%#Eval("adminID")%>
                                </td>
                                <td>
                                    <%#Eval("adminPwd")%>
                                </td>
                            </tr>
                        </ItemTemplate>
                        <FooterTemplate>
                            </table>
                        </FooterTemplate>
                    </asp:Repeater>
                    <br />
                    <webdiyer:AspNetPager ID="AspNetPager1" runat="server" CustomInfoHTML="总记录数:%RecordCount%, 总页数:%PageCount%, 当前为第 %CurrentPageIndex% 页"
                        FirstPageText="<<" LastPageText=">>" LayoutType="Div" NextPageText=">" NumericButtonCount="6"
                        PageIndexBoxType="DropDownList" PageSize="1" PrevPageText="<" ShowNavigationToolTip="true"
                        PagingButtonSpacing="6px" ShowCustomInfoSection="Right" OnPageChanged="AspNetPager1_PageChanged"
                        Font-Size="12px" HorizontalAlign="Center" Width="100%" AlwaysShow="true" CustomInfoSectionWidth="40%">
                    </webdiyer:AspNetPager>
                    <br />
                    &nbsp;
                </td>
            </tr>
        </table>
    </div>
    </form>
</body>
</html>
